using System;
using System.Collections;
using System.Collections.Generic;
using GameBaseFramework.Pattern;
using GameBaseFramework.Timer;
using UnityEngine;

public class DataManager
{
    #region 整理后的模块


    #endregion

    /// <summary>
    /// 更新
    /// </summary>
    /// <param name="deltaTime"></param>
    public void Update(float deltaTime)
    {

    }


    /// <summary>
    /// 简化网络消息发送写法
    /// </summary>
    public void SendTypeAction<T>(Action<T> action, T value)
    {
        TimerManager.Delay(0f, () =>
        {
            action?.Invoke(value);
        });
    }

    /// <summary>
    /// 简化网络消息静态消息写法
    /// </summary>
    public static void SendType<T>(Action<T> action, T value)
    {
        TimerManager.Delay(0f, () =>
        {
            action?.Invoke(value);
        });
    }
}
